<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1">
    <meta content="telephone=no" name="format-detection" />
    <script>
        var isJsBridgeReady = false;
        var isZHKIOS= false;
        function readyFunc(device){
            isJsBridgeReady = true;
            if(device == 'true'){
              isZHKIOS = true;
            }
        }
    </script>
    <title>订单详情</title>
    <link rel="stylesheet" href="../css/pro_app.min.css" />
    <link rel="stylesheet" href="../lib/yz-sm.min.css">
    <link rel="stylesheet" href="../lib/mobiscroll/mobiscroll.custom-2.17.0.min.css"/>
</head>

<body>
    <div class="page-group">
        <div class="page order-details" id="orderDetailPage">
            <!--订单详情模板-->
            <script type="text/template" id="orderDetailTpl">
                <div class="section">
                    <!-- 头详情模块 -->
                        <div class="total-get">
                            <div>
                                    {{if orderType == 6 }}
                                    顾客实付
                                    {{else}}
                                    收银实收
                                    {{/if}}
                            </div>
                            <p id="xmg_money">{{ if supplierReceiveAmount != '' }}
                                    ¥ {{ supplierReceiveAmount.toFixed(2) }}
                                    {{ else }}
                                    ¥ 0.00
                                {{ /if }}
                            </p>
                        </div>
                        <ul class="order-list">
                            <li id="xmg_ddje">
                                <span>订单金额</span>
                                <div id="xmg_hqddje">{{ if totalAmount != '' }}
                                        ¥ {{ totalAmount.toFixed(2) }}
                                        {{ else }}
                                    ¥ 0.00
                                    {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_chf">
                                <span>餐盒费</span>
                                <div>{{ if packingAmount != '' }}
                                        ¥ {{ packingAmount.toFixed(2) }}
                                        {{ else }}
                                    ¥ 0.00
                                    {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_psf">
                                <span>配送费</span>
                                <div>{{ if totalPayAmount != '' }}
                                         ¥ {{ totalPayAmount.toFixed(2) }}
                                         {{ else }}
                                    ¥ 0.00
                                    {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_fwf">
                                <span>服务费</span>
                                <div>{{ if serviceAmount != '' }}
                                        ¥ {{ serviceAmount.toFixed(2) }}
                                        {{ else }}
                                    ¥ 0.00
                                    {{ /if }}
                                 </div>
                            </li>
                            <li id="xmg_qtfy">
                                <span>其他费用</span>
                                <div>{{ if otherAmount != '' }}
                                         ¥ {{ otherAmount.toFixed(2) }}
                                         {{ else }}
                                    ¥ 0.00
                                    {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_spqdk">
                                <span>商品券抵扣</span>
                                <div>{{ if cancellationAmount != '' }}
                                         ¥ {{ cancellationAmount.toFixed(2) }}
                                    {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_yhje">
                                <span>优惠金额</span>
                                <div>
                                     {{ if discountAmount != '' }}
                                        ¥ {{ discountAmount.toFixed(2) }}
                                        {{ else }}
                                    ¥ 0.00
                                   {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_mljg">
                                <span >抹零金额</span>
                                <div>
                                        {{ if molingAmount != '' }}
                                        ¥ {{ molingAmount.toFixed(2) }}
                                        {{ else }}
                                    ¥ 0.00
                                   {{ /if }}
                                </div>
                                </li>
                        </ul>
                        <ul class="order-list border-top">
                            <li id="xmg_zh">
                                <span>桌号</span>
                                <div>
                                    {{ if tableNum != '' }}
                                        {{ tableNum }}
                                        {{ else }}
                                        --
                                   {{ /if }}
                                </div>
                            </li>
                            <li id="xmg_qch">
                                <span>取餐号</span>
                                <div>
                                    {{ if takeFoodNum != '' }}
                                        {{ takeFoodNum }}
                                        {{else}}
                                        --
                                   {{ /if }}
                                </div>
                            </li>
                        </ul>
                    </div>
                    <!-- 明细模块 -->
                    <div class="section" id="xmg_orderMxDcd">
                        <div class="title">
                                {{ if orderType == 1 }}
                                商品核销明细
                                {{ else if orderType == 2 }}
                                储值明细
                                {{ else if orderType == 3 }}
                                点餐订单明细
                                {{ else if orderType == 4 }}
                                桌边付明细
                                {{ else if orderType == 5 }}
                                POS点餐明细
                                {{ else if orderType == 6 }}
                                外卖明细
                                {{ else if orderType == 7 }}
                                预约点餐明细
                                {{ else }}
                                {{ orderType }}
                                {{ /if }}
                        </div>
                        <ul id="xmg_sy" class="three-colo" >
                            <div id="xmg_xsy"  class="sub-title">
                                <i class="zhk-homepage_dd" ></i>
                                <span>
                                    {{if orderType == 2 }}
                                    储值
                                    {{ else if orderType == 3 }}
                                    点菜单
                                    {{ else if orderType == 4 }}
                                    点菜单
                                    {{ else if orderType == 5 }}
                                    点菜单
                                    {{ else if orderType == 6 }}
                                    点菜单
                                    {{ else if orderType == 7 }}
                                    点菜单
                                    {{ else }}
                                    {{ orderType }}
                                    {{ /if }}
                                </span>
                            </div>
                            {{ each goodsDetailList as item i }}
                            <li id="xmg_waimai">
                                <span class="name">
                                        {{item.goodsName}}
                                    <div class="attr">
                                    {{ if orderType == 7 }}
                                        {{item.remark}}
                                        {{ else }}
                                        {{item.specName}}
                                        {{item.specPropertyName}}
                                    {{ /if }}
                                    </div>
                                </span>
                                <span class="count">
                                {{ if orderType == 7 }}
                                        x{{item.dishNum}}
                                 {{ else if orderType == 4 }}
                                    x{{item.dishNum}}
                                 {{ else if orderType == 1 }}
                                    x{{item.num}}
                                        {{ else }}
                                        x{{item.goodsCopies}}
                                    {{ /if }}
                                </span>
                                <span class="total-money">
                                    <span>￥{{item.goodsPayPrice.toFixed(2)}}</span>
                                </span>
                            </li>
                            {{ /each }}
                        </ul>
                        <!-- 储值详情 -->
                        <ul id="xmg_czxq" class="order-list">
                             {{ each goodsDetailList as item i }}
                            <li id="xmg_hukh">
                                <span>会员卡号</span>
                                <div>
                                    {{item.cardAccountText}}
                                </div>
                            </li>
                            <li>
                                <span id="xmg_czje">储值金额</span>
                                <div>
                                    {{ if totalAmount != '' }}
                                    ¥ {{ totalAmount.toFixed(2) }}
                                    {{ else }}
                                    ¥ 0.00
                                     {{ /if }}
                                </div>
                            </li>
                            <li>
                                <span id="xmg_zsje">赠送金额</span>
                                <div>
                                    {{ if item.donateAmount != '' }}
                                    ¥ {{ item.donateAmount.toFixed(2) }}
                                    {{ else }}
                                    ¥ 0.00
                                     {{ /if }}
                                </div>
                            </li>
                            <li>
                                <span id="xmg_knye">充值后卡内余额</span>
                                <div>
                                    {{ if item.tradeAfterAmount != '' }}
                                        ¥ {{ item.tradeAfterAmount.toFixed(2) }}
                                        {{ else }}
                                        ¥ 0.00
                                    {{ /if }}
                                </div>
                            </li>
                            <!-- <li>
                                <span id="xmg_jysj">交易时间</span>
                                <div>
                                {{ item.operatorTimeText }}
                                </div>
                            </li> -->
                            {{ /each }}
                        </ul>
                        <!-- 外卖详情 -->
                        <ul id="xmg_shrdhbz" class="order-list">
                            <li id="xmg_shr">
                                <span>收货人</span>
                                <div>
                                    {{recipientName}}
                                </div>
                            </li>
                            <li>
                                <span id="xmg_lxdh">联系电话</span>
                                <div>
                                    {{recipientPhone}}
                                </div>
                            </li>
                            <li>
                                <span id="xmg_bz">备注</span>
                                <div>
                                    {{remark}}
                                </div>
                            </li>
                        </ul>
                        <!-- 预约点餐 -->
                        <ul id="xmg_yydc" class="order-list">
                                <li id="xmg_jcrs">
                                    <span>就餐人数</span>
                                    <div>
                                        {{personNum}}
                                    </div>
                                </li>
                                <li>
                                    <span id="xmg_jcfs">就餐方式</span>
                                    <div>
                                        {{if dinnerType == 1 }}
                                        堂食
                                        {{ else if dinnerType == 2 }}
                                        打包
                                        {{ else }}
                                        {{ dinnerType }}
                                        {{ /if }}
                                    </div>
                                </li>
                                <li>
                                    <span id="xmg_jcsj">就餐时间</span>
                                    <div>
                                        {{serviceBeginText}}
                                    </div>
                                </li>
                                <li>
                                    <span id="xmg_yylxdh">联系电话</span>
                                    <div>
                                        {{memberMobile}}
                                    </div>
                                </li>
                                <li>
                                    <span id="xmg_yybz">备注</span>
                                    <div>
                                        {{remark}}
                                    </div>
                                </li>
                            </ul>
                    </div>
                <div class="section"> 
                <div class="title">订单详情</div>
                <ul class="order-list">
                    <li>
                        <span>订单编号</span>
                        <div>{{ orderId }}</div>
                    </li>
                    <li id="xmg_cyorderid">
                        <span>餐饮系统订单编号</span>
                        <div>{{ billNo }}</div>
                    </li>
                    <li>
                        <span >交易流水号</span>
                        <div>{{ bizNo }}</div>
                    </li>
                    <li>
                        <span >订单状态</span>
                        <div>
                            {{ if newOrderStatus == 1 }}
                            <div class="status-blue">已收款</div>
                            {{ else if newOrderStatus == 2 }}
                            <div class="status-red">已退款</div>
                            {{ else if newOrderStatus == 3 }}
                            退款中
                            {{ else if newOrderStatus == 4 }}
                            撤销中
                            {{ else if newOrderStatus == 5 }}
                            已撤销
                            {{ else if newOrderStatus == 6 }}
                            <div class="status-blue">外卖已完成</div>
                            {{ else if newOrderStatus == 7 }}
                            <div class="status-red">外卖已退款</div>
                            {{ else if newOrderStatus == 8 }}
                            预约点餐已取餐
                            {{ else if newOrderStatus == 9 }}
                            <div class="status-red"> 预约点餐已退款</div>
                            {{ else if newOrderStatus == 10 }}
                            预约点餐待制作
                            {{ else if newOrderStatus == 11 }}
                            预约点餐待取餐
                            {{ else if newOrderStatus == 12 }}
                            收款失败
                            {{ else if newOrderStatus == 13 }}
                            收款异常
                            {{ else }}
                            {{ orderStatus }}
                            {{ /if }}
                        </div>
                    </li>
                    <li>
                        <span>订单类型</span>
                        <div>
                            {{ if orderType == 1 }}
                            收银
                            {{ else if orderType == 2 }}
                            储值
                            {{ else if orderType == 3 }}
                            点餐
                            {{ else if orderType == 4 }}
                            桌边付
                            {{ else if orderType == 5 }}
                            POS点餐
                            {{ else if orderType == 6 }}
                            外卖
                            {{ else if orderType == 7 }}
                            预约点餐
                            {{ else }}
                            {{ orderType }}
                            {{ /if }}
                        </div>
                    </li>
                    <li>
                        <span>收款方式</span>
                        <div id="xmg_hqskfs">
                            {{ if payType == 1 }}
                                现金
                            {{ else if payType == 2 }}
                                支付宝
                            {{ else if payType == 3 }}
                                会员卡
                            {{ else if payType == 4 }}
                                银联
                            {{ else if payType == 5 }}
                                微信
                            {{ else }}
                                {{ payType }}
                            {{ /if }}
                        </div>
                    </li>
                    <li>
                        <span >交易时间</span>
                        <div>
                            {{ createTimeText }}
                        </div>
                    </li>
                    <li id="xmg_syyxing">
                        <span >操作人</span>
                        <div>
                            {{ operatorName }}
                        </div>
                    </li>
                    <li>
                        <span>订单来源</span>
                        <div>{{ if orderPlatformSource == 1 }}
                             云平台
                            {{ else if orderPlatformSource == 2 }}
                            POS端
                            {{ else if orderPlatformSource == 3 }}
                            App端
                            {{ else if orderPlatformSource == 4 }}
                            电脑端
                            {{ else if orderPlatformSource == 5 }}
                            快享付
                            {{ else if orderPlatformSource == 6 }}
                            扫码点餐
                            {{ else if orderPlatformSource == 7 }}
                            桌边付
                            {{ else if orderPlatformSource == 8 }}
                            云小盒Plus
                            {{ else if orderPlatformSource == 9 }}
                            饿了么外卖
                            {{ else if orderPlatformSource == 10 }}
                            美团外卖
                            {{ else if orderPlatformSource == 11 }}
                            其他外卖平台
                            {{ else if orderPlatformSource == 12 }}
                            口碑预约点餐
                            {{ else }}
                            {{orderPlatformSource}}
                            {{ /if }}

                        </div>
                    </li>
                    <li>
                        <span>发票状态</span>
                        <div>
                            {{ if invoiceStatus == 0 }}
                            未开票
                            {{ else if invoiceStatus == 1 }}
                            蓝票开票中
                            {{ else if invoiceStatus == 2 }}
                            已开蓝票
                            {{ else if invoiceStatus == 3 }}
                            开蓝票失败
                            {{ else if invoiceStatus == 4 }}
                            红票开票中
                            {{ else if invoiceStatus == 5 }}
                            开红票失败
                            {{ else if invoiceStatus == 6 }}
                            已开红票
                            {{ else }}
                            未开票
                            {{ /if }}
                        </div>
                     </li>
                </ul>
            </div>
            <div class="section" id="xmg_fpxx">
                    <div class="title">
                        发票信息
                        <i class="zhk-list_rarrow"></i>
                    </div>
                    <ul class="order-list">
                        <li>
                            <span>发票抬头</span>
                            <div>{{invoiceTitle}}</div>
                        </li>
                        <li>
                            <span>纳税识别号</span>
                            <div>{{taxpayerId}}</div>
                        </li>
                    </ul>
                </div>
                <div class="section" id="xmg_psxx">
                    <div class="title">
                        配送信息
                        <i class="zhk-list_rarrow"></i>
                    </div>
                    <ul class="order-list">
                        <li>
                            <span>配送方式</span>
                            <div>
                                {{ if logisticsCode == 0 }}
                                商家自配送
                                {{ else if logisticsCode == 1 }}
                                外卖平台专送
                                {{ else if logisticsCode == 2 }}
                                外卖平台众包
                                {{ else }}
                               {{logisticsCode}}
                                {{ /if }}
                            </div>
                        </li>
                        <li>
                            <span>配送员姓名</span>
                            <div>
                                {{shipperName}}
                            </div>
                        </li>
                        <li>
                            <span>配送员电话</span>
                            <div>
                                {{shipperPhone}}
                            </div>
                        </li>
                    </ul>
                </div>
            </script>
             <!--订单退款模板-->
            <script type="text/template" id="orderRefundTpl">
                <div class="section">
                <div class="title">退款记录
                    <i class="zhk-list_rarrow"></i>
                </div>
                <ul class="order-list">       
                    {{ each refundList as item i }}
                    <li>
                        <span>实退金额</span>
                        <div >
                            {{ if item.reAmount != '' }}
                                ¥ {{ item.reAmount }}
                            {{ /if }}
                        </div>
                    </li>
                    <li>
                        <span>操作人</span>
                        <div>
                            {{ item.payeeName }}
                        </div>
                    </li>
                    <li>
                        <span>退款时间</span>
                        <div>
                            {{ item.tradeTime }}
                        </div>
                    </li>
                    <li>
                        <span>退款原因</span>
                        <div>
                              {{ item.refundReason }}
                        </div>
                    </li>
                    {{ /each }}
                </ul>
            </div>
            </script>
            <div class="scroll-view">
                <ul class="header">
                    <li class="left back" id="xmg_return" ><a ><i class="zhk-nav_back"></i >返回</a></li>
                    <li class="middle">订单详情</li>
                    <li class="right"><span id="xmg_tk" class="rightTk" style="display: none;">退款</span></li>
                </ul>
                <div class="page-body">
                    <div class="item-box" id="orderDetailDiv">
                    </div>
                    <div class="item-box refund" id="orderRefundDiv">
                    </div>
                </div>
                <div class="refund-dialog hide">
                        <div class="refund-layer"></div>
                        <div class="refund-dialog-content">
                            <div class='confirmContent'>
                                <h3>申请退款</h3>
                                <ul>
                                    <li>
                                        <span class='left'>应收金额</span>
                                        <span class='right' id="xmg_tkje"></span>
                                    </li>
                                    <li>
                                        <span class='left'>退款方式</span>
                                        <span class='right' id="xmg_tkfs"></span>
                                    </li>
                                    <li>
                                        <input id="xmg_shrje" placeholder='请填写退款金额' onkeypress="if((event.keyCode<48 || event.keyCode>57) && event.keyCode!=46 || /\.\d\d{2}$/.test(value))event.returnValue=false" type="number" />
                                    </li>
                                    <li>
                                        <input id="xmg_dlpass" placeholder='请填写登录密码' type='password' />
                                    </li>
                                    <li>
                                        <input id = "xmg_sryy" placeholder='请填写退款原因(选填)' maxlength="20" type='text' />
                                    </li>
                                </ul>
                            </div>
                            <div class="btn-box">
                                <span class="left">取消</span>
                                <span id="xmg_refunds"   class="right disable">确定退款</span>
                            </div>
                        </div>
                    </div>
            </div>
        </div>
    </div>

   

    <script src="../lib/zepto.min.js"></script>
    <script src="../lib/yz-sm.min.js"></script>
    <script src="../lib/template.js"></script>
    <script src="../lib/swiper.min.js"></script>
    <script src="../lib/mobiscroll/mobiscroll.custom-2.17.0.min.js"></script>

    <script src="../base/recalc.js" compress="../base/base.js"></script>
    <script src="../base/dialog.js" compress="../base/base.js"></script>
    <script src="../base/common.js" compress="../base/base.js"></script>
    <script src="../base/appservice.js" compress="../base/base.js"></script>
    <script src="../base/h5service.js" compress="../base/base.js"></script>
    <script src="../js/orderDetailA.js" compress="../js/main.js"></script>
    <script src="../js/orderDetailC.js" compress="../js/main.js"></script>
    
</body>
